import requests


headers = {
    "accept": "*/*",
    "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
    "cache-control": "no-cache",
    "next-router-state-tree": "%5B%22%22%2C%7B%22children%22%3A%5B%22(course)%22%2C%7B%22children%22%3A%5B%22course%22%2C%7B%22children%22%3A%5B%5B%22courseId%22%2C%221792807139336581122%22%2C%22d%22%5D%2C%7B%22children%22%3A%5B%22section%22%2C%7B%22children%22%3A%5B%5B%22sectionId%22%2C%221792873981379932162%22%2C%22d%22%5D%2C%7B%22children%22%3A%5B%22__PAGE__%22%2C%7B%7D%2C%22%2Fcourse%2F1792807139336581122%2Fsection%2F1792873981379932162%22%2C%22refresh%22%5D%7D%5D%7D%2Cnull%2Cnull%5D%7D%2Cnull%2Cnull%5D%7D%2Cnull%2Cnull%5D%7D%2Cnull%2Cnull%5D%7D%2Cnull%2Cnull%2Ctrue%5D",
    "next-url": "/course/1792807139336581122/section/1792873981379932162",
    "pragma": "no-cache",
    "priority": "u=1, i",
    "referer": "https://www.codefather.cn/course/1792807139336581122/section/1792873981379932162",
    "rsc": "1",
    "sec-ch-ua": "\"Chromium\";v=\"142\", \"Microsoft Edge\";v=\"142\", \"Not_A Brand\";v=\"99\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "\"Windows\"",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "same-origin",
    "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.0.0.0"
}
cookies = {
    "_ga": "GA1.1.915592532.1734498395",
    "Hm_lvt_3a44649edfc3f514e794de38320045f0": "1756708165,1756882615,1756972731,1757557375",
    "__51huid__JyijP8zIhGUD9hWn": "332d0671-1a1c-56a0-88c1-6c45c9a37e85",
    "X-Internal-Token": "ec813c82-3418-471d-82ac-730190b72187",
    "Hm_lvt_2675818a983a3131404cee835018f016": "1762252716,1763137404",
    "HMACCOUNT": "06D1F1816DD4C515",
    "Hm_lpvt_2675818a983a3131404cee835018f016": "1763138452",
    "_ga_D6S5V4GGDN": "GS2.1.s1763137403$o271$g1$t1763138768$j60$l0$h0"
}
url = "https://www.codefather.cn/course/1792807139336581122/section/1792874037801709570"
params = {
    "_rsc": "1ru4l"
}
response = requests.get(url, headers=headers, cookies=cookies, params=params)

# 设置正确的编码格式
response.encoding = 'utf-8'

print(response.text)
print(response)
